﻿using System;
using System.Globalization;
using System.Windows.Data;

namespace RytmSerca.Converters
{
    public class NegateConverter : IValueConverter
    {
        private static readonly IValueConverter instance = new NegateConverter();

        public static IValueConverter Instance
        {
            get { return instance; }
        }
        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
        {
            return !(bool) value;
        }

        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
        {
            throw new NotSupportedException();
        }
    }
}